<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>上传大文件</title>
        <script src="../../src/JSUtils/CWeb.js"></script>
    </head>
    <body>
        <input type="file" id="file" onchange="UploadFile(0)">
        <progress id="progress" max="100" value="0"></progress>
    </body>
</html>

<script>
    
    function fileInfo() {
        let fileObj = document.getElementById('file').files[0];
        console.log(fileObj);
    }
    
    function UploadFile() {
        let fileObj = document.getElementById('file').files[0];
        let progress = document.getElementById('progress');
        
        WebPost_UploadFile(fileObj, function (value, max) {
            progress.value = value;
            progress.max = max;
        }, function () {
            console.log("上传完成=" + fileObj.path);
        })
    }

</script>